<?php
include('../_fonction/fonction.php');

session_start();

$nb=$_SESSION['idFiche'];
$requete = "	SELECT 	id,
			titre,
			nom,
			prenom,
			initiale,
			genre,
			email,
			type_ins,
			institution,
			type_instit,
			laboratoire,
			statut,
			adresse,
			ville,
			zip,
			etat,
			pays,
			mobile,
			tel,
			nationalite,
			nb_resume,
			alimentation,
			intolerance,
			date_ins 
		FROM users 
		WHERE id=".$nb;

//echo $requete;
$resultat=$connexion->query($requete);

$tabResultat=$resultat->fetchAll(PDO::FETCH_ASSOC);
//echo '<pre>';
//var_dump($tabResultat);
//echo '</pre>';
$retour='[';
foreach($tabResultat as $result){
	foreach($result as $k=>$v){
	$retour.='["'.$k.'" , "'.$v.'"],';
}
$retour=substr($retour,0,-1);
}
$retour.=']';	
echo $retour;

?>




	
